public class Test {
    public static void main(String[] args) {
        int n = 1;
        do{
            System.out.println(n);
            n++;
        }while(n <= 10);



/*
        int sum = 0;
        //外层循环求阶乘的和
        for (int i = 1; i <= 5; i++) {
            int tmp = 1;
            //内层循环求各个数的阶乘
            for (int j = 1; j <= i; j++) {
                tmp *= j;
            }
            sum += tmp;
        }
        System.out.println(sum); //153
*/


/*
        int result = 1;
        for (int i = 1; i <= 5; i++) {
            result *= i;
        }
        System.out.println(result); //120
*/


/*
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        System.out.println(sum); //5050
*/
/*
        for (int i = 1; i <= 10; i++) {
            System.out.println(i);
        }
*/
    }






    public static void main3(String[] args) {
        int n = 100;
        while(n <= 200){
            if(n % 3 != 0){
                n++;
                continue;
            }
            System.out.println(n);
            n++;
        }

    }
/*
        int n = 100;
        while(n <= 200){
            if(n % 3 == 0){
                System.out.println("找到了，为" + n);
                break;
            }
            n++;
        }
    }
*/
    public static void main2(String[] args) {
/*
        int n = 1;
        int sum = 0;
        //外层循环求阶乘的和
        while(n <= 5){
            int m = 1;
            int tmp = 1;
            //内层循环求各个数的阶乘
            while(tmp <= n){
                m *= tmp;
                tmp++;
            }
            sum += m;
            n++;
        }
        System.out.println(sum); //153
*/


/*
        int n = 1;
        int result = 1;
        while(n <= 5){
            result *= n;
            n++;
        }
        System.out.println(result); //120
*/

/*
        int n = 1;
        int result = 0;
        while(n <= 100){
            result += n;
            n++;
        }
        System.out.println(result); //5050
*/


        /*int n = 1;
        while(n <= 10){
            System.out.println(n);
            n++;
        }*/



/*
        int day = 1;
        switch(day){
            case 1:{
                System.out.println("星期一");
                break;
            }
            case 2:{
                System.out.println("星期二");
                break;
            }
            case 3:{
                System.out.println("星期三");
                break;
            }
            case 4:{
                System.out.println("星期四");
                break;
            }
            case 5:{
                System.out.println("星期五");
                break;
            }
            case 6:{
                System.out.println("星期六");
                break;
            }
            case 7:{
                System.out.println("星期天");
                break;
            }
            default:{
                System.out.println("输入错误");
                break;
            }
        }
*/
    }





    public static void main1(String[] args) {
        int year = 2000;
        if(year % 100 == 0){
            if(year % 400 == 0){
                System.out.println("是闰年");
            }else{
                System.out.println("不是闰年");
            }
        }else{
            if(year % 4 == 0){
                System.out.println("是闰年");
            }else{
                System.out.println("不是闰年");
            }
        }

/*
        int n = 10;
        if(n > 0){
            System.out.println("n 为正数");
        }else if(n < 0){
            System.out.println("n 为负数");
        }else{
            System.out.println("n 为0");
        }
*/

       /* if(n % 2 == 0){
            System.out.println("n 为偶数");
        }else{
            System.out.println("n 为奇数");
        }*/
/*
        int score = 95;
        if(score >= 90){
            System.out.println("优秀");
        }else if(score >= 80 && score < 90){
            System.out.println("良好");
        }else if(score >= 70 && score < 80){
            System.out.println("中等");
        }else if(score >= 60 && score < 70){
            System.out.println("及格");
        }else if(score >= 0 && score < 60){
            System.out.println("不及格");
        }else{
            System.out.println("数据错误");
        }
*/

        /*int score = 95; //假设小王考95
        if(score > 90){
            System.out.println("玩手机");
        }else{
            System.out.println("打屁股");
        }
*/

        /*System.out.println("cc");
        System.out.println("bb");
        System.out.println("aa");
        //运行结果
        //cc
        //bb
        //aa

        System.out.println("aa");
        System.out.println("bb");
        System.out.println("cc");
        //运行结果
        //aa
        //bb
        //cc*/

    }
}
